package com.njwb.day09.exception;

public class Test04 {
    public static void main(String[] args) {

        //InputMisMatchException ArithmeticException  ==>有异常，但是并未使用try。。catch处理，程序不会出现编译错误
//        Scanner in = new Scanner(System.in);
//        System.out.print("请输入被除数:");
//        int num1 = in.nextInt();
//        System.out.print("请输入除数:");
//        int num2 = in.nextInt();
//        System.out.println(String.format("%d / %d = %d",
//                num1, num2, num1/ num2));
//        System.out.println("感谢使用本程序！");



//        String message =  Util.readFile("chapter03/chapter03.iml");
//        System.out.println(message);

        Person p = new Person();
        try {
           p.setName("张三");
           p.setSex("男");
           p.setAge(20);
        } catch (SexException e) {
            e.printStackTrace();
        } catch (AgeException e) {
            e.printStackTrace();
        }catch(Exception e) {
            e.printStackTrace();
        }finally {
            System.out.println("person："+p.toString());
        }



    }
}
